import Vue from 'vue'
import Vuex from 'vuex'
import cart from '@/store/cart'
import address from '@/store/address'
import user from '@/store/user'
Vue.use(Vuex) // 将vuex安装为vue的插件

const store = new Vuex.Store({
  // 挂载store模块
  modules:{
    'mcart': cart, // 导入模块的store，并且命名
    'userAddress': address,
    'muser': user
  }
})
// 向外共享store
export default store